<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');

    $router->get('/dashboard', 'DashboardController@index')->name('dashboard');
    $router->resource('inspections', InspectionsController::class);

    $router->resource('broadcasts', BroadcastsController::class);

    $router->post('api/editors/upload', 'Api\EditorsController@upload');
    $router->get('api/products', 'Api\ProductsController@index');
    $router->get('api/users', 'Api\UsersController@index');
    $router->get('api/user/increase', 'Api\CountsController@userIncrease');
    $router->get('api/user/consist', 'Api\CountsController@userConsist');
    $router->get('api/everyday/profit', 'Api\CountsController@everydayProfit');
    $router->get('api/provinces', 'Api\AreasController@province');
    $router->get('api/areas', 'Api\AreasController@area');

    $router->resource('configs', ConfigsController::class);
    $router->resource('config-withdraws', ConfigWithdrawsController::class);
    $router->resource('config-goods', ConfigGoodsController::class);
    $router->resource('config-apps', ConfigAppsController::class);
    $router->resource('config-sales', ConfigSalesController::class);
    $router->resource('config-storms', ConfigStormsController::class);

    $router->resource('super-users', SuperUsersController::class);
    $router->resource('users', UsersController::class);
    $router->resource('grades', GradesController::class);
    $router->get('users/batch/sms/form', 'UsersController@smsForm')->name('users.batch.sms.form');
    $router->post('users/batch/sms/store', 'UsersController@smsStore')->name('users.batch.sms.store');

    $router->resource('addresses', AddressesController::class);

    $router->resource('upgrade-logs', UpgradeLogsController::class);

    $router->resource('posters', PostersController::class);
    $router->resource('invite-posters', InvitePostersController::class);


    $router->get('withdraws/postback', 'WithdrawsController@postback')->name('withdraws.postback');
    $router->resource('withdraws', WithdrawsController::class);
    $router->get('withdraws/export/pending', 'WithdrawsController@export')->name('withdraws.export');
    $router->post('withdraws/import', 'WithdrawsController@import')->name('withdraws.import');


    $router->resource('slides', SlidesController::class);
    $router->resource('categories', CategoriesController::class);

    $router->resource('attribute-groups', AttributeGroupsController::class);
    $router->resource('attribute-keys', AttributeKeysController::class);
    $router->resource('attribute-values', AttributeValuesController::class);

    $router->resource('brands', BrandsController::class);

    $router->resource('products', ProductsController::class);
    $router->resource('product-skus', ProductSkusController::class);
    $router->resource('product-slides', ProductSlidesController::class);
    $router->resource('product-images', ProductImagesController::class);

    $router->resource('hot-products', HotProductsController::class);

    $router->resource('vendors', VendorsController::class);
    $router->resource('vendor-orders', VendorOrdersController::class);
    $router->post('vendor-orders/{order}/deliver', 'VendorOrdersController@deliver')->name('vendor.orders.deliver');
    $router->post('vendor-orders/import', 'VendorOrdersController@import')->name('vendor.orders.import');
    $router->resource('vendor-admins', VendorAdminsController::class);

    $router->resource('orders', OrdersController::class);
    $router->post('orders/{order}/deliver', 'OrdersController@deliver')->name('orders.deliver');
    $router->get('orders/undelivered/export/normal', 'OrdersController@exportNormal')->name('orders.export.normal');
    $router->get('orders/undelivered/export/group', 'OrdersController@exportGroup')->name('orders.export.group');
    $router->get('orders/undelivered/exports', 'OrdersController@exports')->name('orders.exports');
    $router->get('orders/undelivered/deliveries', 'OrdersController@deliveries')->name('orders.deliveries');
    $router->post('orders/deliveries/import', 'OrdersController@import')->name('orders.deliveries.import');
    $router->resource('order-refunds', OrderRefundsController::class);


    $router->resource('blind-box-categroies', BlindBoxCategoriesController::class);
    $router->resource('blind-boxes', BlindBoxesController::class);

    $router->get('blind-boxes/batch/blind/box/products', 'BlindBoxesController@batchBlindBoxProductsFrom')->name('blind.boxes.batch.products');
    $router->post('blind-boxes/batch/blind/box/products', 'BlindBoxesController@storeBatchBlindBoxProducts')->name('blind.boxes.store.batch.products');
    $router->resource('blind-box-levels', BlindBoxLevelsController::class);
    $router->resource('blind-box-products', BlindBoxProductsController::class);

    $router->resource('coupons', CouponsController::class);
    $router->resource('coupon-records', CouponRecordsController::class);

    $router->resource('vip-categories', VipCategoriesController::class);
    $router->resource('vip-welfares', VipWelfaresController::class);
    $router->resource('vip-welfare-details', VipWelfareDetailsController::class);

    $router->resource('drink-categories', DrinkCategoriesController::class);
    $router->resource('drink-attrs', DrinkAttrsController::class);

     $router->resource('seckill-products',SeckillProductsController::class);

     $router->resource('rewards', RewardsController::class);
     $router->resource('activities', ActivitiesController::class);
     $router->resource('activity-records', ActivityRecordsController::class);


    $router->resource('comments', CommentsController::class);
    $router->resource('screens', ScreensController::class);
    $router->resource('prices', PricesController::class);
    $router->resource('ages', AgesController::class);
    $router->resource('mileages', MileagesController::class);
    $router->resource('times', TimesController::class);
    $router->resource('types', TypesController::class);
    $router->resource('displacements', DisplacementsController::class);
    $router->resource('standards', StandardsController::class);
    $router->resource('news', NewsController::class);
    $router->resource('deep-news', DeepNewsController::class);
     $router->get('resumes/export', 'ResumesController@export')->name('resumes.export');
    $router->resource('resumes', ResumesController::class);
     $router->resource('invoices', InvoicesController::class);


   


   
});
